<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Web</title>
		<style type="text/css"> 
				body{
						background: blue
					}
				#adress{
					line-height: 50px;
					margin: 10px;
					background: #9c9c9c;
				}
				#time{
					line-height: 50px;
					margin: 10px;
					background: #9c9c9c;
				}
		</style>
	</head>
	
	<body>
		<h2>WebView</h2>
		<div><span id="adress" >点击选择地址</span></div>
		<br/>
		<div><span id="time">点击选择时</span></div>
		<br/>
		<div><span>这里显示地址</span><input  id="backadress"  type="text"></div>
		<br/>
		<div><span>这里显示时间</span><input id="backtime" type="text"></div>
	</body>
	<script type="application/javascript">
		
		var adresClike=document.getElementById("adress")
		adresClike.addEventListener("click",function(){
			if(window.callandroid){
				callandroid.pressAdrees()
			}else{
				alert("callandroid不存在")
			}
			
		})
		
		var timeClike=document.getElementById("time")
		timeClike.addEventListener("click",function(){
			if(window.callandroid){
				callandroid.pressTime()
			}else{
				alert("callandroid不存在")
			}
		})
		
		var addrees=function(str){
				var inputAdrees=document.getElementById("backadress")
				inputAdrees.value=str
				
			}
		var time=function(str){
				var inputTime=document.getElementById("backtime")
				inputTime.value=str
				
			}
		
	</script>
</html>
